# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=fractal
pkgver=4.4.0
pkgrel=2
pkgdesc="Matrix group messaging app"
url="https://wiki.gnome.org/Apps/Fractal"
arch="x86_64 x86 armhf armv7 aarch64 ppc64le" # limited by Rust
license="GPL-3.0-or-later"
depends="dbus:org.freedesktop.Secrets xdg-utils"
makedepends="meson gtk+3.0-dev dbus-dev openssl1.1-compat-dev gspell-dev libhandy-dev
	gtksourceview4-dev gstreamer-dev gst-plugins-base-dev gst-plugins-bad-dev
	gst-editing-services-dev glib-dev cargo gmp-dev gst-plugins-good-gtk"
options="!check" # no tests
subpackages="$pkgname-lang"
source="https://gitlab.gnome.org/GNOME/fractal/-/archive/$pkgver/fractal-$pkgver.tar.gz
	meson-0.60.patch
	"

case "$CARCH" in
	x86)
		export CFLAGS="$CFLAGS -fno-stack-protector"
		;;
esac

build() {
	abuild-meson . output
	meson compile ${JOBS:+-j ${JOBS}} -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
0dfc363ad7f152976e224bdab52b469f8277b214cf47180611a26622ea9e370477c947ace62fe0a6b275e79416b0288c7d021ca3afb387277810a9a26433d6ef  fractal-4.4.0.tar.gz
852a04feb051d641085c7e84d81e4f3eb8fb917e779569547bedfdd6445181f9faf9f33a21235c467da9a02b2f043b00cbc7ffe63f899a0778d81c5d116ddbde  meson-0.60.patch
"
